package com.design.factory.AbstractFactory;

public class PizzaSonCheese extends Pizza { 	//披萨 + 奶酪
	PizzaIngredientFactory ingredientFactory;
 
	public PizzaSonCheese(PizzaIngredientFactory ingredientFactory) {
		this.ingredientFactory = ingredientFactory;
	}
 
	void prepare() {							//披萨 + 奶酪  <--- (配料)
		System.out.println("Preparing " + name);
		XDough = ingredientFactory.createDough();
		XSauce = ingredientFactory.createSauce();
		XCheese = ingredientFactory.createCheese();
	}
}
